----------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/kostancadhima/Dropbox/BC Election Survey/dhimaetal_replication/dhimaetal_replication_appendix.log
  log type:  text
 opened on:  19 Nov 2021, 09:32:23

. 
. #delimit ; 
delimiter now ;
. *     ***********************************************************************   *;
. *     ***********************************************************************   *;
. *       File-Name:      dhimaetal_replication_appendix.do                                       *;
. *       Date:           August 15, 2020                                         *;
. *       Author:         KD, SNG, LBS, KVDS                                      *;
. *       Purpose:        Take dhimaetal_data.dta and replicate paper analysis    *;
. *           Input File:     dhimaetal_data.dta"                                                                         *;
> *       Output File:    dhimaetal_replication_appendix.og                                       *;
> *       Data Output:                                                                                            *;        
>     
> *       Previous file:                                                                                                    
>               *;
> *       Machine:        desktop/laptop                                                                          *;
> *     ***********************************************************************   *;
> *     ***********************************************************************   *;
> 
> *set working directory
> 
> 
> use "dhimaetal_data.dta", clear;
> 
> *     ***********************************************************************   *;
> *               Appendix Analysis                                                                                         
>                       *;
> *     ***********************************************************************   *;
> 
> 
> *       **************************************************************  *;
> *   **************************************************************      *;
> *               Online Appendix E                                                                                       *;
> *               Table A2: Mean votes for women under all 3 electoral            *;
> *               systems for treatment groups 1 and 2,                                           *; 
> *               by gender of the voter and by vote in the FPTV                          *;
> *               election (Liberal and NDP voters only).                                         *;
> *       **************************************************************  *;
> *   **************************************************************      *;
> 
> *Liberal Party Voters*
> 
> * Group 1 --> Liberal Party All Repondents 
> mean fptpwoman if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> 
> * Group 1 --> Liberal Party Women Repondents
> mean fptpwoman if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> 
> * Group 1 --> Liberal Party Men Repondents
> mean fptpwoman if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> 
> *footnote 1
> prtest OLPRfemale=0.47 if OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> prtest OLPRfemale=0.47 if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> prtest OLPRfemale=0.47 if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> 
> * Group 2 --> Liberal Party All Repondents
> mean fptpwoman if gender<3 & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman if gender<3 & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman if gender<3 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> 
> * Group 2 --> Liberal Party Women Repondents
> mean fptpwoman if gender==2  & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman if gender==2  & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman if gender==2 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> 
> * Group 2 --> Liberal Party Men Repondents
> mean fptpwoman if gender==1 & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman if gender==1  & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman if gender==1 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
> 
> 
> *NDP Voters*
> 
> * Group 1 --> NDP Party All Repondents
> mean fptpwoman   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> * Group 1 --> NDP Party Women Repondents
> mean fptpwoman   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> * Group 1 --> NDP Party Men Repondents
> mean fptpwoman   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean CLPR15woman   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> mean OLPRfemale   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> *footnote 2
> prtest OLPRfemale=0.4 if OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> prtest OLPRfemale=0.4 if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> prtest OLPRfemale=0.4 if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
> 
> 
> * Group 2 --> NDP Party All Repondents
> mean fptpwoman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> 
> * Group 2 --> NDP Party Women Repondents
> mean fptpwoman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> 
> 
> * Group 2 --> NDP Party Men Repondents
> mean fptpwoman   if  gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean CLPR5woman   if  gender==1& STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> mean STVwoman   if  gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> 
> *footnote 3
> prtest STVwoman=0.4 if STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> prtest STVwoman=0.4 if gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> prtest STVwoman=0.4 if gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
> 
> 
> *       **************************************************************  *;
> *   **************************************************************      *;
> *               Figure A2: Fraction of preferential votes received                      *;
> *               by the Liberal and NDP Candidates under OLPR.                           *;
> *       **************************************************************  *;
> *   **************************************************************      *;
> 
> histogram LibCandidates_OLPR if OLPRParty==1, discrete percent scheme(burd);
> graph save lib, replace;
> 
> histogram NDPCandidates_OLPR if OLPRParty==2, discrete percent ysc(r(0 30)) ylabel(0 10 20 30) scheme(burd);
> graph save ndp, replace;
> 
> graph combine lib.gph ndp.gph;
> graph export fig_a2.png, replace;
> 
> 
> *       **************************************************************  *;
> *   **************************************************************      *;
> *               Online Appendix F                                                                                       *;
> *               Table A3: Propensity to Vote for Woman Candidate                        *;
> *               under OLPR                                                                                                
>       *;
> *       **************************************************************  *;
> *   **************************************************************      *;
> 
> *OLPR vote: All Channels + controls
> logit OLPRfemale FemaleStrongGenderIdentity MaleWeakGenderIdentity MaleStrongGenderIdentity FemaleStrongStereotypes MaleSt
> rongStereotypes leftright InfoCandidates FPTPFemaleIncumbent FPTPFemaleNoInc FPTPMaleNoInc CLPR15woman age UniversityEduca
> tion  if gender<3 &  votefptp!=. & CLPR!=. & OLPRParty!=.;
> 
> *       **************************************************************  *;
> *   **************************************************************      *;
> *               Table A4: Propensity to Vote for Woman Candidate                        *;
> *               under STV                                                                                                 
>       *;
> *       **************************************************************  *;
> *   **************************************************************      *;
> 
> *STV vote: All Channels + controls
> logit STVwoman  FemaleStrongGenderIdentity MaleWeakGenderIdentity MaleStrongGenderIdentity FemaleStrongStereotypes MaleStr
> ongStereotypes leftright InfoCandidates FPTPFemaleIncumbent FPTPFemaleNoInc FPTPMaleNoInc   CLPR5woman age UniversityEduca
> tion if gender<3 & votefptp!=. & CLPR5Party!=.  & STVParty!=.;
> 
> 
> 
> *       **************************************************************  *;
> *   **************************************************************      *;
> *               REPLICATION COMPLETE                                                                            *;
> *       **************************************************************  *;
> *   **************************************************************      *;
> 
> log close;

end of do-file

. use "dhimaetal_data.dta", clear

. 
. 
. histogram LibCandidates_OLPR if OLPRParty==1, discrete percent scheme(burd)
(start=1, width=1)

. graph save lib, replace
(file lib.gph saved)

. 
. histogram NDPCandidates_OLPR if OLPRParty==2, discrete percent ysc(r(0 30)) ylabel(0 10 20 30) scheme(burd)
(start=1, width=1)

. graph save ndp, replace
(file ndp.gph saved)

. 
. graph combine lib.gph ndp.gph

. graph export fig_a2.png, replace
(file fig_a2.png written in PNG format)

. 
. 
. clear

. do "/var/folders/3p/03yg2yyd5p1fzxfchdqgh3km0000gn/T//SD30025.000000"

. version 14.2

. 
. log using "dhimaetal_replication_paper.log", replace
log file already open
r(604);

end of do-file

r(604);

. log close
      name:  <unnamed>
       log:  /Users/kostancadhima/Dropbox/BC Election Survey/dhimaetal_replication/dhimaetal_replication_appendix.log
  log type:  text
 closed on:  19 Nov 2021, 09:38:06
----------------------------------------------------------------------------------------------------------------------------
